<div class="product" style="margin-top:10px;">
	<style>
		.woocommerce_tabs div.entry_content.panel { padding-left:10px;padding-right:10px; }
		#tab-featuredproducts img { width:200px;height:200px; }
		td.featuredproducttitle { font-size:15px;font-weight:bold; }
		div.savebluebox { width:100px;height:30px;line-height:30px;text-align:center;font-size:12px;font-weight:bold;color:#ffffff;background:#263692;float:left;margin:0px; }
		div.featuredproductprice { width:100px;height:30px;line-height:30px;font-size:20px;font-weight:bold;color:#263692;float:left;margin:0px;margin-right:10px; }
    </style>
	<div class="woocommerce_tabs">
		<ul class="tabs">
        	<li class="producttab"><a href="#tab-products">Products</a></li>
        	<li class="learntab"><a href="#tab-faqs">FAQs</a></li>
			<li class="learntab"><a href="#tab-howtoguides">How-To Guides</a></li>
			<li class="learntab"><a href="#tab-learningcenter">Learning Center</a></li>
            <li class="learntab"><a href="#tab-moreresources">More Resources</a></li>
		</ul>
        
	<div id="tab-products" class="panel entry_content" style="display:none;">
            
            <div class="featuredcatproduct">
                 <?php
                    $category = $wp_query->queried_object;
                    $catID = 'product_cat_'  . ($category->term_id);
                ?>
    
                <?php if(get_field('catfeaturedproductone', $catID)) { ?>
                 
                <?php $featuredproductid = get_field('catfeaturedproductone', $catID); ?>
    
                <?php $featuredproduct = new wp_Query('post_type=product&p='.$featuredproductid.''); ?>
    
                <?php if($featuredproduct->have_posts()) { ?>
                
                    <h2 class="pagesubsectionheader">Featured Product</h2>
                
                    <?php while($featuredproduct->have_posts()) : 
                            $featuredproduct->the_post();
                ?>
                    
                    <?php
                        $productsku = get_post_custom($post->ID);
                        $showsku = $productsku['_sku'];
                        foreach ( $showsku as $showsku );
                        
                        $listprice = get_post_custom($post->ID);
                        $showlistprice = $listprice['_regular_price'];
                        foreach ( $showlistprice as $showlistprice );
	
                        $youpay = get_post_custom($post->ID);
                        $showyoupay = $youpay['_sale_price'];
                        foreach ( $showyoupay as $showyoupay );
                        
                        $savings = (($showlistprice - $showyoupay) / $showlistprice);
                        $showsavings = $savings * 100;
                    ?>
                    
                    <div class="featuredcatproductimage">
                        <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID )); ?>
                        <a href="<?php the_permalink(); ?>"><img  src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width="200" height="200" /></a>
                    </div>
                    <div class="featuredcatproductcontenttop">
                        <h2 style="margin-bottom:5px;"><?php the_title(); ?></h2>
                        <p style="font-size:11px;font-style:italic;color:#747170;"><?php echo $showsku; ?></p>
                    </div>
                    <div class="featuredcatproductcontentbottom">
                        <div class="featuredcatproductontentbottomleft">
                            <?php the_excerpt(); ?>
                        </div>
                        <div class="featuredcatproductontentbottomright">
                            <h3 style="font-size:20px;font-weight:bold;color:#263692;">$<?php echo $showyoupay; ?></h3>
                            <p style="text-decoration:strike-through;">List Price: $<?php echo ($showlistprice); ?></p>
                            <div style="margin-bottom:15px;">Save <?php echo round($showsavings); ?>%</div>
                            <p><a class="button" href="<?php the_permalink(); ?>">View Product</a></p>
                        </div>
                    </div>
                    
                    <div style="width:100%;height:0px;clear:both;"></div>
                        
                    <?php endwhile; ?>
                <?php } ?>
                <?php wp_reset_query() ; ?>
    
                <?php } ?>

            </div>
    
    	        <h2 class="pagesubsectionheader subcats">Popular Subcategories</h2>
			<ul class="subcats">
				<?php woocommerce_product_subcategories(); ?>
    		</ul>
        
        <?php if ( ! have_posts() ) { ?>
    <style>
		ul.products { visibility:hidden;display:none; }
	</style>
<?php } ?>

		<?php if ( have_posts() ) : ?>
			<style>
				h2.subcats { display:none; }
			</style>
			<?php do_action('woocommerce_before_shop_loop'); ?>
            
            <h2 class="pagesubsectionheader">Shop Our <?php echo single_term_title(); ?></h2>

			<ul class="products">

				<?php while ( have_posts() ) : the_post(); ?>

					<?php woocommerce_get_template_part( 'content', 'product' ); ?>

				<?php endwhile; // end of the loop. ?>

			</ul>

			<?php do_action('woocommerce_after_shop_loop'); ?>

		<?php else : ?>

			<?php if ( ! woocommerce_product_subcategories( array( 'before' => '<ul class="products">', 'after' => '</ul>' ) ) ) : ?>

				<p><?php _e( 'No products found which match your selection.', 'woocommerce' ); ?></p>

			<?php endif; ?>

		<?php endif; ?>

		<div class="clear"></div>

		<?php
			/**
			 * woocommerce_pagination hook
			 *
			 * @hooked woocommerce_pagination - 10
			 * @hooked woocommerce_catalog_ordering - 20
			 */
			do_action( 'woocommerce_pagination' );
		?>
    
    </div>

	<div id="tab-faqs" class="panel entry_content" style="display:none;">
		<h3 class="widget-title" style="font-size:15px;font-weight:bold;">Frequently Asked Questions</h3>
        <p style="font-weight:bold;">Check out our great FAQs and Answers for our <?php echo single_term_title( "", false ); ?> below:</p>
        
        <?php the_field('catfaqcontent', 'product_cat_'.$category_ID.''); ?>
        
	</div>
    <div id="tab-howtoguides" class="panel entry_content" style="display:none;">
		<h3 class="widget-title" style="font-size:15px;font-weight:bold;">Category How-To Guides</h3>
        <p style="font-weight:bold;">Check out our great DIY and How-To Guides for our <?php echo single_term_title( "", false ); ?> below:</p>
        
        <?php the_field('cathowtocontent', 'product_cat_'.$category_ID.''); ?>
		
	</div>
	<div id="tab-learningcenter" class="panel entry_content" style="display:none;">
		<h3 class="widget-title" style="font-size:15px;font-weight:bold;">Category Learning Guide</h3>
        <p style="font-weight:bold;">Check out our great Information &amp; Learning Guides for our <?php echo single_term_title( "", false ); ?> below:</p>
        
        <?php the_field('catlearninguidecontent', 'product_cat_'.$category_ID.''); ?>
        
	</div>
	<div id="tab-moreresources" class="panel entry_content" style="display:none;">
		<h3 class="widget-title" style="font-size:15px;font-weight:bold;">Additional &amp; Related Resources</h3>
        <p style="font-weight:bold;">Check out our great Documents &amp; Additional Resources for our <?php echo single_term_title( "", false ); ?> below:</p>
        
        <ul>
			<li><a href="http://www.siliconsolar.com/publication/silicon-solar-company-brochure/wppa_open">Silicon Solar Company Information Brochure</a></li>
			<li><a href="http://www.siliconsolar.com/publication/sunmaxx-company-information-brochure/wppa_open">SunMaxx Company Information Brochure</a></li>
			<li><a href="http://techvideos.siliconsolar.com" target="_blank">Solar How-To &amp; Troubleshooting Videos</a></li>
            <li><a href="http://www.solarwebinars.com" target="_blank">Interested In Solar Hot Water? Check Out Our Solar Hot Water Training Videos</a></li>
            
            <?php // Include Link To SolarHotWater.SiliconSolar.com On Hot Water Category Pages
				if (is_tax( 'product_cat', array( 'solar-hot-water-heaters', 'flat-plate-solar-collectors', 'solar-evacuated-tube-collectors', 'u-pipe-evacuated-tube-solar-collectors', 'replacement-evacuated-tubes', 'thermosyphon-solar-hot-water', 'demo-solar-hot-water-collectors', 'solar-water-storage-tanks', 'residential-solar-storage-tanks', 'non-pressurized-storage-tanks', 'non-pressurized-storage-tank-accessories', 'marathon-residential-solar-storage-tanks', 'solar-pumping-stations', 'stormaxx-dw-solar-storage-tanks', 'stormaxx-pressurized-buffer-tanks', 'stormaxx-se-solar-storage-tanks', 'stormaxx-simple-drainback-storage-tanks', 'solar-hot-water-accessories', 'pre-packaged-solar-thermal-systems', 'solar-glycol-heat-transfer-fluids', 'solar-glycol-xt', 'pre-insulated-line-set', 'solar-expansion-tanks', 'solar-heat-exchangers', 'solar-hot-water-circulator-pumps', 'solar-hot-water-drainback-tanks-accessories', 'solar-hot-water-mounting-hardware', 'solar-plumbing-hardware', 'solar-simulation-software', 'solar-water-storage-controllers-and-stations', 'solar-commercial-hot-water-systems', 'solar-residential-hot-water-systems', 'heliomaxx-combi-kits', 'cold-climate-residential-solar-hot-water-kits', 'warm-climate-residential-solar-hot-water-kits', 'basic-pre-insulated-line-set', 'buried-pre-insulated-line-set', 'pre-insulated-line-set-hardware', 'air-to-water-solar-heat-exchangers', 'brazed-plate-solar-heat-exchangers', 'butler-solar-wand-heat-exchangers', 'shell-tube-solar-heat-exchangers', 'el-sid-dc-circulator-pumps', 'grundfos-solar-circulator-pumps', 'laing-solar-circulator-pumps', 'polysun-software-packages', 'solar-pool-heaters', 'solar-pool-heater-accessories', 'fafco-solar-pool-heaters', 'solar-pump-stations', 'solar-controller-accessories', 'solar-water-storage-controllers' ) ) ) {
					echo '<li><a href="http://solarhotwater.siliconsolar.com" target="_blank">Solar Hot Water Information &amp; Learning Guide</a></li>';
			} ?>
            
		</ul>
        
		<?php include '/home/silicons/public_html/wp-content/themes/siliconsolar/yarpp-template-example.php'; ?>

	</div>
    </div>

</div>